<template>
  <!-- 操作日志页面 -->
  <div class="operationLog-container">
    <el-row class="operationLogSearch">
      <header
        style="padding:5px;padding-bottom:30px;align-items:center;text-align:center;"
        v-if="!serachMore"
      >
        <el-input
          v-model="searchFF.userName"
          placeholder="请输入用户名"
          style="width:300px;"
        ></el-input>
        <el-button type="primary" style="margin:0 20px">查询</el-button>
        <i
          class="el-icon-arrow-down"
          @click="serachMore = true"
          style="cursor:pointer;font-weight:600"
        ></i>
      </header>
      <header style="padding:5px; text-align: center;" v-if="serachMore">
        <el-form
          inline
          :model="searchFF"
          label-position="right"
          label-width="100px"
        >
          <el-row>
            <el-form-item label="用户名：">
              <el-input
                v-model="searchFF.userName"
                placeholder="请输入用户名"
                style="width:150px;margin-right:30px"
              ></el-input>
            </el-form-item>
            <el-form-item label="用户姓名：">
              <el-input
                v-model="searchFF.userRealName"
                placeholder="请输入用户姓名"
                style="width:150px;margin-right:30px"
              ></el-input>
            </el-form-item>
            <el-form-item label="日志信息：">
              <el-input
                v-model="searchFF.logName"
                placeholder="请输入日志信息"
                style="width:150px;margin-right:30px"
              ></el-input>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item label="日志类型：">
              <el-select
                v-model="searchFF.logType"
                placeholder="请选择日志类型"
                style="width:150px;margin-right:30px"
              >
                <el-option
                  v-for="item in logTypeList"
                  :label="item.label"
                  :value="item.value"
                  :key="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="起始时间：">
              <el-date-picker
                type="datetime"
                v-model="searchFF.startDate"
                placeholder="请选择起始时间"
                style="width:150px;margin-right:30px"
                value-format="yyyy-MM-dd HH:mm:ss"
              ></el-date-picker>
            </el-form-item>
            <el-form-item label="结束时间：">
              <el-date-picker
                type="datetime"
                v-model="searchFF.endDate"
                placeholder="请选择结束时间"
                style="width:150px;margin-right:30px"
                value-format="yyyy-MM-dd HH:mm:ss"
              ></el-date-picker>
            </el-form-item>
          </el-row>
        </el-form>
        <div style="text-align:center;padding:10px">
          <el-button type="primary">查询</el-button>
          <el-button
            @click="
              () => {
                for (let k in searchFF) {
                  searchFF[k] = '';
                }
              }
            "
            >重置</el-button
          >
          <el-button @click="serachMore = false">收起</el-button>
        </div>
      </header>
    </el-row>
    <el-row>
      <el-table
        ref="multipleTable"
        :data="tableData"
        style="width: 100%"
      >
        <el-table-column
          width="55"
          type="selection"
          fixed="left"
        ></el-table-column>
        <el-table-column prop="userName" label="用户名"> </el-table-column>
        <el-table-column prop="userRealName" label="用户姓名 " sortable>
        </el-table-column>
        <el-table-column prop="userOrgName" label="用户机构 " sortable>
        </el-table-column>

        <el-table-column prop="clientIp" label="客户端IP地址">
        </el-table-column>
        <el-table-column prop="logType" label="日志类型"> </el-table-column>
        <el-table-column prop="logName" label="日志信息" min-width="300px">
        </el-table-column>
        <el-table-column prop="operateTime" label="日志时间" min-width="100px">
        </el-table-column>
      </el-table>
      <el-pagination
        @size-change="sizeChange"
        @current-change="pageChange"
        :current-page="1"
        :page-sizes="[10, 20, 50, 100, 200]"
        :page-size="10"
        layout="sizes, prev,jumper, next, total"
        :total="400"
      ></el-pagination>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      serachMore: false,
      searchFF: {},
      logTypeList: [
        { value: "01", label: "业务日志" },
        { value: "02", label: "异常日志" }
      ],
      tableData: [
        {
          operateTime: "2020-09-29 13:57:37",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName:
            "RuleTemplate [templateId=, templateCode=TEST_CODE4, templateName=鲲鹏_FTP科目定价, templateType=2]新增",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:29:13",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName: "Rule_test01删除",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:26:58",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName:
            "MethodRule [methodRuleId=40288dfd749095f20174d85400ff0211, methodRuleCode=testCode, versionNum=1, ruleStatus=1, methodRuleGroup=MethodRuleGroup [methodRuleGroup=Rule_test01, ruleGroupName=null], template=RuleTemplate [templateId=40288dfd749095f20174d385a07001c3, templateCode=null, templateName=null, templateType=null], ftpMethodId=3, interestFlag=1, discountFlag=0, assignType=null, assignTerm=null, trackDateType=null, assignRate=null, intDiff=null, averagePeriod=null, termType=null, discountType=null, discountCurveId=null, effectDate=Fri Sep 18 00:00:00 CST 2020, invalidDate=Fri Sep 17 00:00:00 CST 2021, ruleDatas=[MethodRuleData [uuid=b319bebef3b54a329d14bf79dc02ee4b, methodRuleId=40288dfd749095f20174d85400ff0211, templateFieldId=40288dfd749095f20174d385a07301c4, ruleValue=]], repayCurves=null, ftpMethodComment=null]新增",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:24:01",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName: "[Ljava.lang.String;@6ad976cf删除",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:20:25",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName:
            "MethodRule [methodRuleId=40288dfd749095f20174d84e031a020e, methodRuleCode=TestCode, versionNum=2, ruleStatus=1, methodRuleGroup=MethodRuleGroup [methodRuleGroup=Rule_test01, ruleGroupName=null], template=RuleTemplate [templateId=40288dfd749095f20174d385a07001c3, templateCode=null, templateName=null, templateType=null], ftpMethodId=3, interestFlag=1, discountFlag=0, assignType=null, assignTerm=null, trackDateType=null, assignRate=null, intDiff=null, averagePeriod=null, termType=null, discountType=null, discountCurveId=null, effectDate=Fri Sep 18 00:00:00 CST 2020, invalidDate=Fri Sep 17 00:00:00 CST 2021, ruleDatas=[MethodRuleData [uuid=a051b37cd80c4340bedaed9b1e615640, methodRuleId=40288dfd749095f20174d84e031a020e, templateFieldId=40288dfd749095f20174d385a07301c4, ruleValue=0]], repayCurves=null, ftpMethodComment=null]修改",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:20:25",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName:
            "MethodRule [methodRuleId=40288dfd749095f20174d84e0266020c, methodRuleCode=testCode, versionNum=1, ruleStatus=1, methodRuleGroup=MethodRuleGroup [methodRuleGroup=Rule_test01, ruleGroupName=null], template=RuleTemplate [templateId=40288dfd749095f20174d385a07001c3, templateCode=null, templateName=null, templateType=null], ftpMethodId=3, interestFlag=1, discountFlag=0, assignType=null, assignTerm=null, trackDateType=null, assignRate=null, intDiff=null, averagePeriod=null, termType=null, discountType=null, discountCurveId=null, effectDate=Fri Sep 18 00:00:00 CST 2020, invalidDate=Fri Sep 17 00:00:00 CST 2021, ruleDatas=[MethodRuleData [uuid=d1dbfa2e97ae42b8b05c175a6d75de6f, methodRuleId=40288dfd749095f20174d84e0266020c, templateFieldId=40288dfd749095f20174d385a07301c4, ruleValue=]], repayCurves=null, ftpMethodComment=null]新增",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:20:24",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName:
            "MethodRuleGroup [methodRuleGroup=Rule_test01, ruleGroupName=定价测试]新增",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:20:12",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName: "Rule_test01删除",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:16:20",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName:
            "MethodRule [methodRuleId=40288dfd749095f20174d84a455e0207, methodRuleCode=testCode, versionNum=1, ruleStatus=1, methodRuleGroup=MethodRuleGroup [methodRuleGroup=Rule_test01, ruleGroupName=null], template=RuleTemplate [templateId=40288dfd749095f20174d385a07001c3, templateCode=null, templateName=null, templateType=null], ftpMethodId=3, interestFlag=1, discountFlag=0, assignType=null, assignTerm=null, trackDateType=null, assignRate=null, intDiff=null, averagePeriod=null, termType=null, discountType=null, discountCurveId=null, effectDate=Fri Sep 18 00:00:00 CST 2020, invalidDate=Fri Sep 17 00:00:00 CST 2021, ruleDatas=[MethodRuleData [uuid=93072bef61a74f8baf352fc6537fa549, methodRuleId=40288dfd749095f20174d84a455e0207, templateFieldId=40288dfd749095f20174d385a07301c4, ruleValue=]], repayCurves=null, ftpMethodComment=null]新增",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        },
        {
          operateTime: "2020-09-29 13:16:19",
          logId: "",
          userOrgName: "泛鹏银行",
          userName: "sysadmin",
          logName:
            "MethodRuleGroup [methodRuleGroup=Rule_test01, ruleGroupName=定价测试]新增",
          clientIp: "192.168.3.254",
          userRealName: "sys",
          logType: "1"
        }
      ]
    };
  },
  methods: {
    sizeChange(size) {
      searchFF.size = size;
    },
    pageChange(page) {
      searchFF.page = page;
    }
  }
};
</script>

<style lang="scss" scoped>
</style>